#include "addtextdialog.h"
#include "ui_addtextdialog.h"
#include <QFontDialog>
#include <QColorDialog>

addTextDialog::addTextDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::addTextDialog)
{
    ui->setupUi(this);
    this->setWindowTitle("添加文字");
}

addTextDialog::~addTextDialog()
{
    delete ui;
}


void addTextDialog::on_pushButton_font_clicked()
{
    bool ok;
    QFont f=QFontDialog::getFont(&ok);
    if(ok)
        ui->lineEdit->setFont(f);
}

void addTextDialog::on_pushButton_color_clicked()
{
    bool ok;
//    QColorDialog color = QColorDialog::getColor(Qt::red, this);
//    if(ok)
//        ui->lineEdit->setFont(color);
}
